package com.IO;

import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;

public class TestRAndW {
    public static void main(String[] args) throws IOException {
        //输入流对象
        FileReader fr = new FileReader("E:\\testFile\\a.txt");
        //输出流对象
        FileWriter fw = new FileWriter("E:\\theCopyOfa.txt");

        char[] c = new char[1024];//容器
        int len;//
        while ((len = fr.read(c))!=-1){
            fw.write(c);
        }
        fw.flush();
        fr.close();
        fw.close();
    }
}

    